package service;

import entity.Entidad;
import javax.persistence.EntityManager;
import service.exception.*;
import valueObject.ValueObject;

/**
 *
 * @author Juan Sebastian Hernández Serrato
 */
public abstract class AbstractService<VO extends ValueObject, E extends Entidad> {
    abstract public int create(VO valueObject, EntityManager em) throws DuplicateObjectException;
    abstract public VO findById(int id, EntityManager em) throws ObjectNotFoundException;
    abstract public void update(VO valueObject, EntityManager em) throws ObjectNotFoundException;
    abstract public void delete(int id, EntityManager em) throws ObjectNotFoundException;
}